-- GENERATED SPELL FOR [Mana Fiend] --


function spell0_15527(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(25679,pUnit)
pUnit:RegisterEvent('Sorts_15527', 680, 1)
end

function spell1_15527(pUnit, Event) --@Counterspell,n/a--
pUnit:FullCastSpellOnTarget(15122,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15527', 15255, 1)
end

function Sorts_15527(pUnit, Event)
local choix_sorts_15527 = math.random(0, 1)
if choix_sorts_15527 == 0 then
pUnit:RegisterEvent('spell0_15527', 1, 1)
end
if choix_sorts_15527 == 1 then
pUnit:RegisterEvent('spell1_15527', 1, 1)
end
end

function mob15527_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15527', math.random(1500, 3000), 1)
end

function mob15527_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15527_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15527_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15527, 1, 'mob15527_Action')
RegisterUnitEvent(15527, 2, 'mob15527_Leave')
RegisterUnitEvent(15527, 3, 'mob15527_Kill')
RegisterUnitEvent(15527, 4, 'mob15527_Die')
